<template>
  <div>
    <!-- 通过  v-bind：属性名="vue变量"   指令可以给标签动态绑定属性 -->
    <a v-bind:href="url">去百度</a>
    <!-- 简写   ：属性名="vue变量"  -->
    <img :src="imgUrl">
  </div>
</template>

<script>
  export default{
    data(){
      return {
         url:'https://www.baidu.com',
         imgUrl:'https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fimg.pingpingw.com%2Fuploads%2F2019-08%2F30-105919_775.jpg&refer=http%3A%2F%2Fimg.pingpingw.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1643701590&t=7e9fe08f99a330ec3fedf68ef69d2f12'

      }
    }
  }
</script>

<style lang="scss" scoped>

</style>